package org.yefei.homeworkday11;

public class Car {
	/*
	 * 5、汽车由发动机，轮胎，车架，底盘组成， 有外观，价格，油耗等属性 有启动，停止，鸣笛等方法。用oo的思 想定义汽车类，并测试。
	 */
	public String constitute;// 组成
	public String appearance;// 外观
	public int price;// 价格
	public int fuel;// 油耗

	public void showInfo() {
		System.out.println("汽车的组成：" + constitute + ";外观：" + appearance + ";价格是" + price + "万元;油耗是" + fuel + "升");
	}

	public void start() {
		System.out.println("启动！");
	}

	public void stop() {
		System.out.println("停车！");
	}

	public void blow() {
		System.out.println("滴滴！");
	}

	public static void main(String[] args) {
		Car car = new Car();
		car.appearance = "red";
		car.constitute = "发动机、轮胎、车架、底盘";
		car.fuel = 6;
		car.price = 20;
		car.showInfo();
		car.start();
		car.blow();
		car.stop();
	}
}
